package com.xmy.cultivate.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 * 键值对，类型数据，多条数据，比如班级的班主任，学员的联系人
 * </p>
 *
 * @author min
 * @since 2022-08-04
 */
@TableName("type_value_data")
@Data
public class TypeValueData implements Serializable {

    private static final long serialVersionUID = 1L;

    
    private Long id;

    /**
     * 来源id
     */
    
    private Long forId;

    /**
     * 类型id
     * 类型id,如班主任类型为老师，这里就是老师id
     */
    private Integer typeId;

    /**
     * 值id
     * 内容id,如班主任为xx人，即为xx人的id
     */
    private Long valueId;

    /**
     * 内容,如联系人为手动输入的内容
     */
    private String content;

    /**
     * 字典里对应的类型id，老师：21，学员联系人类型：4
     */
    private Integer type;

    
    @TableField(fill = FieldFill.INSERT)
    private Long createdId;

    @TableLogic
    private Integer deleted;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime updatedAt;

    private LocalDateTime deletedAt;

    @ApiModelProperty("学生姓名")
    @TableField(exist = false)
    private String studentName;

}
